package com.gzu.finalwork.user.mapper;


import com.gzu.finalwork.entity.user.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    
    //根据电话号码查询用户
    Users selectByPhone(String phone);
    //根据用户id查询用户
    Users selectByUserId(Long userId);

    //根据用户名查询用户
    Users selectByUsername(String username);
    // 插入用户
    int insertUser(Users users);
    // 更新用户信息
    int updateUser(Users users);
    //更新用户最后登录时间
    int updateLastLoginTime(@Param("userId") Long userId);
    //删除用户
    int deleteUser(Long userId);
}
